home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 / Ham Radio 2000.iso / ham2000 / misc / dspice0s / ovtpvt.c < prev    next >
C/C++ Source or Header  |  1992-11-21  |  21KB  |  724 lines

  1. /* ovtpvt.f -- translated by f2c (version of 3 February 1990  3:36:42).
  2.    You must link the resulting object file with the libraries:
  3.     -lF77 -lI77 -lm -lc   (in that order)
  4. */
  5.  
  6. #include "f2c.h"
  7.  
  8. /* Common Block Declarations */
  9.  
  10. struct {
  11.     integer ielmnt, isbckt, nsbckt, iunsat, nunsat, itemps, numtem, isens, 
  12.         nsens, ifour, nfour, ifield, icode, idelim, icolum, insize, 
  13.         junode, lsbkpt, numbkp, iorder, jmnode, iur, iuc, ilc, ilr, 
  14.         numoff, isr, nmoffc, iseq, iseq1, neqn, nodevs, ndiag, iswap, 
  15.         iequa, macins, lvnim1, lx0, lvn, lynl, lyu, lyl, lx1, lx2, lx3, 
  16.         lx4, lx5, lx6, lx7, ld0, ld1, ltd, imynl, imvn, lcvn, nsnod, 
  17.         nsmat, nsval, icnod, icmat, icval, loutpt, lpol, lzer, irswpf, 
  18.         irswpr, icswpf, icswpr, irpt, jcpt, irowno, jcolno, nttbr, nttar, 
  19.         lvntmp;
  20. } tabinf_;
  21.  
  22. #define tabinf_1 tabinf_
  23.  
  24. struct {
  25.     integer locate[50], jelcnt[50], nunods, ncnods, numnod, nstop, nut, nlt, 
  26.         nxtrm, ndist, ntlin, ibr, numvs, numalt, numcyc;
  27. } cirdat_;
  28.  
  29. #define cirdat_1 cirdat_
  30.  
  31. struct {
  32.     doublereal omega, time, delta, delold[7], ag[7], vt, xni, egfet, xmu, 
  33.         sfactr;
  34.     integer mode, modedc, icalc, initf, method, iord, maxord, noncon, iterno, 
  35.         itemno, nosolv, modac, ipiv, ivmflg, ipostp, iscrch, iofile;
  36. } status_;
  37.  
  38. #define status_1 status_
  39.  
  40. struct {
  41.     integer iprnta, iprntl, iprntm, iprntn, iprnto, limtim, limpts, lvlcod, 
  42.         lvltim, itl1, itl2, itl3, itl4, itl5, itl6, igoof, nogo, keof;
  43. } flags_;
  44.  
  45. #define flags_1 flags_
  46.  
  47. struct {
  48.     doublereal atime, aprog[3], adate, atitle[10], defl, defw, defad, defas, 
  49.         rstats[50];
  50.     integer iwidth, lwidth, nopage;
  51. } miscel_;
  52.  
  53. #define miscel_1 miscel_
  54.  
  55. struct {
  56.     doublereal tcstar[2], tcstop[2], tcincr[2];
  57.     integer icvflg, itcelm[2], kssop, kinel, kidin, kovar, kidout;
  58. } dc_;
  59.  
  60. #define dc_1 dc_
  61.  
  62. struct {
  63.     doublereal fstart, fstop, fincr, skw2, refprl, spw2;
  64.     integer jacflg, idfreq, inoise, nosprt, nosout, nosin, idist, idprt;
  65. } ac_;
  66.  
  67. #define ac_1 ac_
  68.  
  69. struct {
  70.     doublereal tstep, tstop, tstart, delmax, tdmax, forfre;
  71.     integer jtrflg;
  72. } tran_;
  73.  
  74. #define tran_1 tran_
  75.  
  76. struct {
  77.     doublereal xincr, string[15], xstart, yvar[8];
  78.     integer itab[8], itype[8], ilogy[8], npoint, numout, kntr, numdgt;
  79. } outinf_;
  80.  
  81. #define outinf_1 outinf_
  82.  
  83. struct {
  84.     doublereal value[200000];
  85. } blank_;
  86.  
  87. #define blank_1 blank_
  88.  
  89. /* Table of constant values */
  90.  
  91. static integer c__1 = 1;
  92.  
  93. /* spice version 2g.6  sccsid=ovtpvt.ma 3/15/83 */
  94. /*<       subroutine ovtpvt >*/
  95. /* Subroutine */ int ovtpvt_()
  96. {
  97.     /* Initialized data */
  98.  
  99.     static struct {
  100.     char e_1[96];
  101.     doublereal e_2;
  102.     } equiv_33 = { {'d', 'c', ' ', 't', 'r', 'a', 'n', 's', 'f', 'e', 'r',
  103.          ' ', 'c', 'u', 'r', 'v', 'e', 's', ' ', ' ', ' ', ' ', ' ', 
  104.         ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 't', 'r', 'a', 
  105.         'n', 's', 'i', 'e', 'n', 't', ' ', 'a', 'n', 'a', 'l', 'y', 
  106.         's', 'i', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 
  107.         ' ', ' ', ' ', ' ', ' ', 'a', 'c', ' ', 'a', 'n', 'a', 'l', 
  108.         'y', 's', 'i', 's', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 
  109.         ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 
  110.         ' '}, 0. };
  111.  
  112. #define subtit ((doublereal *)&equiv_33)
  113.  
  114.     static struct {
  115.     char e_1[24];
  116.     doublereal e_2;
  117.     } equiv_34 = { {'(', '1', 'p', 'e', '1', '1', '.', '3', ',', '2', 'x',
  118.          ',', '8', 'e', '0', '0', '.', '0', '0', ')', ' ', ' ', ' ', 
  119.         ' '}, 0. };
  120.  
  121. #define prform ((doublereal *)&equiv_34)
  122.  
  123.     static struct {
  124.     char e_1[8];
  125.     doublereal e_2;
  126.     } equiv_35 = { {'.', ' ', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
  127.  
  128. #define aper (*(doublereal *)&equiv_35)
  129.  
  130.     static struct {
  131.     char e_1[8];
  132.     doublereal e_2;
  133.     } equiv_36 = { {')', ' ', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
  134.  
  135. #define rprn (*(doublereal *)&equiv_36)
  136.  
  137.  
  138.     /* Format strings */
  139.     static char fmt_111[] = "(\002y\002)";
  140.  
  141.     /* System generated locals */
  142.     integer i_1, i_2, i_3;
  143.  
  144.     /* Builtin functions */
  145.     integer s_wsfe(), do_fio(), e_wsfe();
  146.     double r_imag(), d_lg10();
  147.  
  148.     /* Local variables */
  149.     static complex cval;
  150.     static doublereal xmag;
  151.     static integer locx;
  152.     extern /* Subroutine */ int move_();
  153.     static integer ipos, locy, locv;
  154.     static doublereal xvar;
  155.     extern /* Subroutine */ int plot_();
  156.     static integer lout;
  157.     static doublereal xphs;
  158.     extern /* Subroutine */ int getm8_();
  159.     static integer i, k;
  160.     static doublereal t1;
  161.     extern /* Subroutine */ int title_();
  162.     static integer locyt, ktype;
  163.     static doublereal t2;
  164.     static integer id;
  165.     extern /* Subroutine */ int ntrpl8_();
  166. #define nodplc ((integer *)&blank_1)
  167. #define cvalue ((complex *)&blank_1)
  168.     extern /* Subroutine */ int second_(), crunch_();
  169.     static integer ifract, ifwdth;
  170.     extern /* Subroutine */ int alfnum_();
  171.     static integer noprln, loc;
  172.     extern /* Subroutine */ int setprn_();
  173.     static integer numpnt;
  174.     extern /* Subroutine */ int clrmem_(), setplt_(), fouran_(), magphs_();
  175.     static doublereal yvr;
  176.  
  177.     /* Fortran I/O blocks */
  178.     static cilist io__20 = { 0, 0, 0, (char *)prform, 0 };
  179.     static cilist io__21 = { 0, 0, 0, fmt_111, 0 };
  180.     static cilist io__29 = { 0, 0, 0, (char *)prform, 0 };
  181.     static cilist io__30 = { 0, 0, 0, fmt_111, 0 };
  182.  
  183.  
  184. /*<       implicit double precision (a-h,o-z) >*/
  185.  
  186.  
  187. /*     this routine generates the requested tabular listings of analysis 
  188. */
  189. /* results.  it calls plot to generate line-printer plots. */
  190.  
  191. /* spice version 2g.6  sccsid=tabinf 3/15/83 */
  192. /*<       common /tabinf/ ielmnt,isbckt,nsbckt,iunsat,nunsat,itemps,numtem, >*/
  193. /*<      1   isens,nsens,ifour,nfour,ifield,icode,idelim,icolum,insize, >*/
  194. /*<      2   junode,lsbkpt,numbkp,iorder,jmnode,iur,iuc,ilc,ilr,numoff,isr, >*/
  195. /*<      3   nmoffc,iseq,iseq1,neqn,nodevs,ndiag,iswap,iequa,macins,lvnim1, >*/
  196. /*<      4   lx0,lvn,lynl,lyu,lyl,lx1,lx2,lx3,lx4,lx5,lx6,lx7,ld0,ld1,ltd, >*/
  197. /*<      5   imynl,imvn,lcvn,nsnod,nsmat,nsval,icnod,icmat,icval, >*/
  198. /*<      6   loutpt,lpol,lzer,irswpf,irswpr,icswpf,icswpr,irpt,jcpt, >*/
  199. /*<      7   irowno,jcolno,nttbr,nttar,lvntmp >*/
  200. /* spice version 2g.6  sccsid=cirdat 3/15/83 */
  201. /*<       common /cirdat/ locate(50),jelcnt(50),nunods,ncnods,numnod,nstop, >*/
  202. /*<      1   nut,nlt,nxtrm,ndist,ntlin,ibr,numvs,numalt,numcyc >*/
  203. /* spice version 2g.6  sccsid=status 3/15/83 */
  204. /*<       common /status/ omega,time,delta,delold(7),ag(7),vt,xni,egfet, >*/
  205. /*<      1   xmu,sfactr,mode,modedc,icalc,initf,method,iord,maxord,noncon, >*/
  206. /*<      2   iterno,itemno,nosolv,modac,ipiv,ivmflg,ipostp,iscrch,iofile >*/
  207. /* spice version 2g.6  sccsid=flags 3/15/83 */
  208. /*<       common /flags/ iprnta,iprntl,iprntm,iprntn,iprnto,limtim,limpts, >*/
  209. /*<      1   lvlcod,lvltim,itl1,itl2,itl3,itl4,itl5,itl6,igoof,nogo,keof >*/
  210. /* spice version 2g.6  sccsid=miscel 3/15/83 */
  211. /*<       common /miscel/ atime,aprog(3),adate,atitle(10),defl,defw,defad, >*/
  212. /*<      1  defas,rstats(50),iwidth,lwidth,nopage >*/
  213. /* spice version 2g.6  sccsid=dc 3/15/83 */
  214. /*<       common /dc/ tcstar(2),tcstop(2),tcincr(2),icvflg,itcelm(2),kssop, >*/
  215. /*<      1   kinel,kidin,kovar,kidout >*/
  216. /* spice version 2g.6  sccsid=ac 3/15/83 */
  217. /*<       common /ac/ fstart,fstop,fincr,skw2,refprl,spw2,jacflg,idfreq, >*/
  218. /*<      1   inoise,nosprt,nosout,nosin,idist,idprt >*/
  219. /* spice version 2g.6  sccsid=tran 3/15/83 */
  220. /*<       common /tran/ tstep,tstop,tstart,delmax,tdmax,forfre,jtrflg >*/
  221. /* spice version 2g.6  sccsid=outinf 3/15/83 */
  222. /*<       common /outinf/ xincr,string(15),xstart,yvar(8),itab(8),itype(8), >*/
  223. /*<      1   ilogy(8),npoint,numout,kntr,numdgt >*/
  224. /* spice version 2g.6  sccsid=blank 3/15/83 */
  225. /*<       common /blank/ value(200000) >*/
  226. /*<       integer nodplc(64) >*/
  227. /*<       complex cvalue(32) >*/
  228. /*<       equivalence (value(1),nodplc(1),cvalue(1)) >*/
  229.  
  230. /*<       complex cval >*/
  231. /*<       dimension prform(3) >*/
  232. /*<       dimension subtit(4,3) >*/
  233. /*<       data subtit / 8hdc trans, 8hfer curv, 8hes      , 8h        , >*/
  234. /*<      1              8htransien, 8ht analys, 8his      , 8h        , >*/
  235. /*<      2              8hac analy, 8hsis     , 8h        , 8h         / >*/
  236. /*<       data prform / 8h(1pe11.3, 8h,2x,8e00, 8h.00)     / >*/
  237. /*<       data aper,rprn / 1h., 1h) / >*/
  238.  
  239. /*<       call second(t1) >*/
  240.     second_(&t1);
  241. /*<       if (icalc.le.0) go to 1000 >*/
  242.     if (status_1.icalc <= 0) {
  243.     goto L1000;
  244.     }
  245. /*<       call crunch >*/
  246.     crunch_();
  247. /*<       if (nogo.lt.0) go to 1000 >*/
  248.     if (flags_1.nogo < 0) {
  249.     goto L1000;
  250.     }
  251.  
  252. /*  construct format statement to be used for printing the outputs */
  253.  
  254. /*<       ifract=max0(numdgt-1,0) >*/
  255. /* Computing MAX */
  256.     i_1 = outinf_1.numdgt - 1;
  257.     ifract = max(0,i_1);
  258. /*<       ifwdth=ifract+9 >*/
  259.     ifwdth = ifract + 9;
  260. /*<       ipos=15 >*/
  261.     ipos = 15;
  262. /*<       call alfnum(ifwdth,prform,ipos) >*/
  263.     alfnum_(&ifwdth, prform, &ipos);
  264. /*<       call move(prform,ipos,aper,1,1) >*/
  265.     move_(prform, &ipos, &aper, &c__1, &c__1);
  266. /*<       ipos=ipos+1 >*/
  267.     ++ipos;
  268. /*<       call alfnum(ifract,prform,ipos) >*/
  269.     alfnum_(&ifract, prform, &ipos);
  270. /*<       call move(prform,ipos,rprn,1,1) >*/
  271.     move_(prform, &ipos, &rprn, &c__1, &c__1);
  272.  
  273. /*<       noprln=min0(8,(lwidth-12)/ifwdth) >*/
  274. /* Computing MAX */
  275.     i_1 = 8, i_2 = (miscel_1.lwidth - 12) / ifwdth;
  276.     noprln = min(i_2,i_1);
  277. /*<       if (mode-2) 50,60,300 >*/
  278.     if ((i_1 = status_1.mode - 2) < 0) {
  279.     goto L50;
  280.     } else if (i_1 == 0) {
  281.     goto L60;
  282.     } else {
  283.     goto L300;
  284.     }
  285. /*<    50 numout=jelcnt(41)+1 >*/
  286. L50:
  287.     outinf_1.numout = cirdat_1.jelcnt[40] + 1;
  288. /*<       go to 70 >*/
  289.     goto L70;
  290. /*<    60 numout=jelcnt(42)+1 >*/
  291. L60:
  292.     outinf_1.numout = cirdat_1.jelcnt[41] + 1;
  293.  
  294. /*  dc and transient analysis printing */
  295.  
  296. /*<    70 loc=locate(30+mode) >*/
  297. L70:
  298.     loc = cirdat_1.locate[status_1.mode + 29];
  299. /*<    80 if (loc.eq.0) go to 200 >*/
  300. L80:
  301.     if (loc == 0) {
  302.     goto L200;
  303.     }
  304. /*<       kntr=min0(noprln,nodplc(loc+3)) >*/
  305. /* Computing MAX */
  306.     i_1 = noprln, i_2 = nodplc[loc + 2];
  307.     outinf_1.kntr = min(i_2,i_1);
  308. /*<       if (kntr.le.0) go to 120 >*/
  309.     if (outinf_1.kntr <= 0) {
  310.     goto L120;
  311.     }
  312. /*<       call title(1,lwidth,1,subtit(1,mode)) >*/
  313.     title_(&c__1, &miscel_1.lwidth, &c__1, &subtit[(status_1.mode << 2) - 4]);
  314.  
  315. /*<       call setprn(loc) >*/
  316.     setprn_(&loc);
  317.  
  318. /*  get buffer space */
  319.  
  320. /*<       call getm8(locx,npoint) >*/
  321.     getm8_(&locx, &outinf_1.npoint);
  322. /*<       call getm8(locy,kntr*npoint) >*/
  323.     i_1 = outinf_1.kntr * outinf_1.npoint;
  324.     getm8_(&locy, &i_1);
  325.  
  326. /*  interpolate outputs */
  327.  
  328. /*<       call ntrpl8(locx,locy,numpnt) >*/
  329.     ntrpl8_(&locx, &locy, &numpnt);
  330.  
  331. /*  print outputs */
  332.  
  333. /*<       do 100 i=1,numpnt >*/
  334.     i_1 = numpnt;
  335.     for (i = 1; i <= i_1; ++i) {
  336. /*<       xvar=value(locx+i) >*/
  337.     xvar = blank_1.value[locx + i - 1];
  338. /*<       locyt=locy >*/
  339.     locyt = locy;
  340. /*<       do 90 k=1,kntr >*/
  341.     i_2 = outinf_1.kntr;
  342.     for (k = 1; k <= i_2; ++k) {
  343. /*<       yvar(k)=value(locyt+i) >*/
  344.         outinf_1.yvar[k - 1] = blank_1.value[locyt + i - 1];
  345. /*<       locyt=locyt+npoint >*/
  346.         locyt += outinf_1.npoint;
  347. /*<    90 continue >*/
  348. /* L90: */
  349.     }
  350. /*<       write (iofile,prform) xvar,(yvar(k),k=1,kntr) >*/
  351.     io__20.ciunit = status_1.iofile;
  352.     s_wsfe(&io__20);
  353.     do_fio(&c__1, (char *)&xvar, (ftnlen)sizeof(doublereal));
  354.     i_2 = outinf_1.kntr;
  355.     for (k = 1; k <= i_2; ++k) {
  356.         do_fio(&c__1, (char *)&outinf_1.yvar[k - 1], (ftnlen)sizeof(
  357.             doublereal));
  358.     }
  359.     e_wsfe();
  360. /*<   100 continue >*/
  361. /* L100: */
  362.     }
  363. /*<       write (iofile,111) >*/
  364.     io__21.ciunit = status_1.iofile;
  365.     s_wsfe(&io__21);
  366.     e_wsfe();
  367. /*<   111 format(1hy) >*/
  368. /*<       call clrmem(locx) >*/
  369.     clrmem_(&locx);
  370. /*<       call clrmem(locy) >*/
  371.     clrmem_(&locy);
  372. /*<   120 loc=nodplc(loc) >*/
  373. L120:
  374.     loc = nodplc[loc - 1];
  375. /*<       go to 80 >*/
  376.     goto L80;
  377.  
  378. /*  dc and transient analysis plotting */
  379.  
  380. /*<   200 loc=locate(35+mode) >*/
  381. L200:
  382.     loc = cirdat_1.locate[status_1.mode + 34];
  383. /*<   210 if (loc.eq.0) go to 250 >*/
  384. L210:
  385.     if (loc == 0) {
  386.     goto L250;
  387.     }
  388. /*<       kntr=nodplc(loc+3) >*/
  389.     outinf_1.kntr = nodplc[loc + 2];
  390. /*<       if (kntr.le.0) go to 220 >*/
  391.     if (outinf_1.kntr <= 0) {
  392.     goto L220;
  393.     }
  394. /*<       locv=nodplc(loc+1) >*/
  395.     locv = nodplc[loc];
  396. /*<       call title(1,lwidth,1,subtit(1,mode)) >*/
  397.     title_(&c__1, &miscel_1.lwidth, &c__1, &subtit[(status_1.mode << 2) - 4]);
  398.  
  399. /*<       call setplt(loc) >*/
  400.     setplt_(&loc);
  401.  
  402. /*     get buffer space */
  403.  
  404. /*<       call getm8(locx,npoint) >*/
  405.     getm8_(&locx, &outinf_1.npoint);
  406. /*<       call getm8(locy,kntr*npoint) >*/
  407.     i_1 = outinf_1.kntr * outinf_1.npoint;
  408.     getm8_(&locy, &i_1);
  409.  
  410. /*  interpolate outputs and load plot buffers */
  411.  
  412. /*<       call ntrpl8(locx,locy,numpnt) >*/
  413.     ntrpl8_(&locx, &locy, &numpnt);
  414. /*<       call plot(numpnt,locx,locy,locv) >*/
  415.     plot_(&numpnt, &locx, &locy, &locv);
  416. /*<       call clrmem(locx) >*/
  417.     clrmem_(&locx);
  418. /*<       call clrmem(locy) >*/
  419.     clrmem_(&locy);
  420. /*<   220 loc=nodplc(loc) >*/
  421. L220:
  422.     loc = nodplc[loc - 1];
  423. /*<       go to 210 >*/
  424.     goto L210;
  425.  
  426. /*  fourier analysis */
  427.  
  428. /*<   250 if (mode.eq.1) go to 1000 >*/
  429. L250:
  430.     if (status_1.mode == 1) {
  431.     goto L1000;
  432.     }
  433. /*<       if (nfour.eq.0) go to 1000 >*/
  434.     if (tabinf_1.nfour == 0) {
  435.     goto L1000;
  436.     }
  437. /*<       if (nogo.ne.0) go to 1000 >*/
  438.     if (flags_1.nogo != 0) {
  439.     goto L1000;
  440.     }
  441. /*<       call fouran >*/
  442.     fouran_();
  443. /*<       go to 1000 >*/
  444.     goto L1000;
  445.  
  446. /*  ac analysis printing */
  447.  
  448. /*<   300 numout=jelcnt(43)+jelcnt(44)+jelcnt(45)+1 >*/
  449. L300:
  450.     outinf_1.numout = cirdat_1.jelcnt[42] + cirdat_1.jelcnt[43] + 
  451.         cirdat_1.jelcnt[44] + 1;
  452. /*<       do 599 id=33,35 >*/
  453.     for (id = 33; id <= 35; ++id) {
  454. /*<       loc=locate(id) >*/
  455.     loc = cirdat_1.locate[id - 1];
  456. /*<   320 if (loc.eq.0) go to 599 >*/
  457. L320:
  458.     if (loc == 0) {
  459.         goto L599;
  460.     }
  461. /*<       kntr=min0(noprln,nodplc(loc+3)) >*/
  462. /* Computing MAX */
  463.     i_1 = noprln, i_2 = nodplc[loc + 2];
  464.     outinf_1.kntr = min(i_2,i_1);
  465. /*<       if (kntr.le.0) go to 595 >*/
  466.     if (outinf_1.kntr <= 0) {
  467.         goto L595;
  468.     }
  469. /*<       call title(1,lwidth,1,subtit(1,mode)) >*/
  470.     title_(&c__1, &miscel_1.lwidth, &c__1, &subtit[(status_1.mode << 2) - 
  471.         4]);
  472. /*<       call setprn(loc) >*/
  473.     setprn_(&loc);
  474.  
  475. /*  print ac outputs */
  476.  
  477. /*<       lout=loutpt >*/
  478.     lout = tabinf_1.loutpt;
  479. /*<       do 590 i=1,icalc >*/
  480.     i_1 = status_1.icalc;
  481.     for (i = 1; i <= i_1; ++i) {
  482. /*<       xvar=dble(real(cvalue(lout+1))) >*/
  483.         i_2 = lout;
  484.         xvar = (doublereal) cvalue[i_2].r;
  485. /*<       do 500 k=1,kntr >*/
  486.         i_2 = outinf_1.kntr;
  487.         for (k = 1; k <= i_2; ++k) {
  488. /*<       iseq=itab(k) >*/
  489.         tabinf_1.iseq = outinf_1.itab[k - 1];
  490. /*<       iseq=nodplc(iseq+4) >*/
  491.         tabinf_1.iseq = nodplc[tabinf_1.iseq + 3];
  492. /*<       cval=cvalue(lout+iseq) >*/
  493.         i_3 = lout + tabinf_1.iseq - 1;
  494.         cval.r = cvalue[i_3].r, cval.i = cvalue[i_3].i;
  495. /*<       ktype=itype(k) >*/
  496.         ktype = outinf_1.itype[k - 1];
  497. /*<       go to (450,450,430,440,450,450), ktype >*/
  498.         switch (ktype) {
  499.             case 1:  goto L450;
  500.             case 2:  goto L450;
  501.             case 3:  goto L430;
  502.             case 4:  goto L440;
  503.             case 5:  goto L450;
  504.             case 6:  goto L450;
  505.         }
  506. /*<   430 yvar(k)=dble(real(cval)) >*/
  507. L430:
  508.         outinf_1.yvar[k - 1] = (doublereal) cval.r;
  509. /*<       go to 500 >*/
  510.         goto L500;
  511. /*<   440 yvar(k)=dble(aimag(cval)) >*/
  512. L440:
  513.         outinf_1.yvar[k - 1] = (doublereal) r_imag(&cval);
  514. /*<       go to 500 >*/
  515.         goto L500;
  516. /*<   450 call magphs(cval,xmag,xphs) >*/
  517. L450:
  518.         magphs_(&cval, &xmag, &xphs);
  519. /*<       go to (460,460,430,440,470,465), ktype >*/
  520.         switch (ktype) {
  521.             case 1:  goto L460;
  522.             case 2:  goto L460;
  523.             case 3:  goto L430;
  524.             case 4:  goto L440;
  525.             case 5:  goto L470;
  526.             case 6:  goto L465;
  527.         }
  528. /*<   460 yvar(k)=xmag >*/
  529. L460:
  530.         outinf_1.yvar[k - 1] = xmag;
  531. /*<       go to 500 >*/
  532.         goto L500;
  533. /*<   465 yvar(k)=20.0d0*dlog10(xmag) >*/
  534. L465:
  535.         outinf_1.yvar[k - 1] = d_lg10(&xmag) * 20.;
  536. /*<       go to 500 >*/
  537.         goto L500;
  538. /*<   470 yvar(k)=xphs >*/
  539. L470:
  540.         outinf_1.yvar[k - 1] = xphs;
  541. /*<   500 continue >*/
  542. L500:
  543.         ;}
  544. /*<       lout=lout+numout >*/
  545.         lout += outinf_1.numout;
  546. /*<   580 write (iofile,prform) xvar,(yvar(k),k=1,kntr) >*/
  547. /* L580: */
  548.         io__29.ciunit = status_1.iofile;
  549.         s_wsfe(&io__29);
  550.         do_fio(&c__1, (char *)&xvar, (ftnlen)sizeof(doublereal));
  551.         i_2 = outinf_1.kntr;
  552.         for (k = 1; k <= i_2; ++k) {
  553.         do_fio(&c__1, (char *)&outinf_1.yvar[k - 1], (ftnlen)sizeof(
  554.             doublereal));
  555.         }
  556.         e_wsfe();
  557. /*<   590 continue >*/
  558. /* L590: */
  559.     }
  560. /*<       write (iofile,111) >*/
  561.     io__30.ciunit = status_1.iofile;
  562.     s_wsfe(&io__30);
  563.     e_wsfe();
  564. /*<   595 loc=nodplc(loc) >*/
  565. L595:
  566.     loc = nodplc[loc - 1];
  567. /*<       go to 320 >*/
  568.     goto L320;
  569. /*<   599 continue >*/
  570. L599:
  571.     ;}
  572.  
  573. /*  ac analysis plotting */
  574.  
  575. /*<       do 760 id=38,40 >*/
  576.     for (id = 38; id <= 40; ++id) {
  577. /*<       loc=locate(id) >*/
  578.     loc = cirdat_1.locate[id - 1];
  579. /*<   610 if (loc.eq.0) go to 760 >*/
  580. L610:
  581.     if (loc == 0) {
  582.         goto L760;
  583.     }
  584. /*<       kntr=nodplc(loc+3) >*/
  585.     outinf_1.kntr = nodplc[loc + 2];
  586. /*<       if (kntr.le.0) go to 750 >*/
  587.     if (outinf_1.kntr <= 0) {
  588.         goto L750;
  589.     }
  590. /*<       locv=nodplc(loc+1) >*/
  591.     locv = nodplc[loc];
  592. /*<       call title(1,lwidth,1,subtit(1,mode)) >*/
  593.     title_(&c__1, &miscel_1.lwidth, &c__1, &subtit[(status_1.mode << 2) - 
  594.         4]);
  595. /*<       call setplt(loc) >*/
  596.     setplt_(&loc);
  597.  
  598. /*<       call getm8(locx,icalc) >*/
  599.     getm8_(&locx, &status_1.icalc);
  600. /*<       call getm8(locy,kntr*icalc) >*/
  601.     i_1 = outinf_1.kntr * status_1.icalc;
  602.     getm8_(&locy, &i_1);
  603.  
  604. /*     load plot buffers */
  605.  
  606. /*<       lout=loutpt >*/
  607.     lout = tabinf_1.loutpt;
  608. /*<       do 710 i=1,icalc >*/
  609.     i_1 = status_1.icalc;
  610.     for (i = 1; i <= i_1; ++i) {
  611. /*<       xvar=dble(real(cvalue(lout+1))) >*/
  612.         i_2 = lout;
  613.         xvar = (doublereal) cvalue[i_2].r;
  614. /*<       locyt=locy >*/
  615.         locyt = locy;
  616. /*<       do 700 k=1,kntr >*/
  617.         i_2 = outinf_1.kntr;
  618.         for (k = 1; k <= i_2; ++k) {
  619. /*<       iseq=itab(k) >*/
  620.         tabinf_1.iseq = outinf_1.itab[k - 1];
  621. /*<       iseq=nodplc(iseq+4) >*/
  622.         tabinf_1.iseq = nodplc[tabinf_1.iseq + 3];
  623. /*<       cval=cvalue(lout+iseq) >*/
  624.         i_3 = lout + tabinf_1.iseq - 1;
  625.         cval.r = cvalue[i_3].r, cval.i = cvalue[i_3].i;
  626. /*<       ktype=itype(k) >*/
  627.         ktype = outinf_1.itype[k - 1];
  628. /*<       go to (670,670,650,660,670,670), ktype >*/
  629.         switch (ktype) {
  630.             case 1:  goto L670;
  631.             case 2:  goto L670;
  632.             case 3:  goto L650;
  633.             case 4:  goto L660;
  634.             case 5:  goto L670;
  635.             case 6:  goto L670;
  636.         }
  637. /*<   650 yvr=dble(real(cval)) >*/
  638. L650:
  639.         yvr = (doublereal) cval.r;
  640. /*<       go to 695 >*/
  641.         goto L695;
  642. /*<   660 yvr=dble(aimag(cval)) >*/
  643. L660:
  644.         yvr = (doublereal) r_imag(&cval);
  645. /*<       go to 695 >*/
  646.         goto L695;
  647. /*<   670 call magphs(cval,xmag,xphs) >*/
  648. L670:
  649.         magphs_(&cval, &xmag, &xphs);
  650. /*<       go to (680,680,650,660,690,685), ktype >*/
  651.         switch (ktype) {
  652.             case 1:  goto L680;
  653.             case 2:  goto L680;
  654.             case 3:  goto L650;
  655.             case 4:  goto L660;
  656.             case 5:  goto L690;
  657.             case 6:  goto L685;
  658.         }
  659. /*<   680 yvr=dlog10(xmag) >*/
  660. L680:
  661.         yvr = d_lg10(&xmag);
  662. /*<       go to 695 >*/
  663.         goto L695;
  664. /*<   685 yvr=20.0d0*dlog10(xmag) >*/
  665. L685:
  666.         yvr = d_lg10(&xmag) * 20.;
  667. /*<       go to 695 >*/
  668.         goto L695;
  669. /*<   690 yvr=xphs >*/
  670. L690:
  671.         yvr = xphs;
  672. /*<   695 value(locyt+i)=yvr >*/
  673. L695:
  674.         blank_1.value[locyt + i - 1] = yvr;
  675. /*<       locyt=locyt+icalc >*/
  676.         locyt += status_1.icalc;
  677. /*<   700 continue >*/
  678. /* L700: */
  679.         }
  680. /*<       value(locx+i)=xvar >*/
  681.         blank_1.value[locx + i - 1] = xvar;
  682. /*<       lout=lout+numout >*/
  683.         lout += outinf_1.numout;
  684. /*<   710 continue >*/
  685. /* L710: */
  686.     }
  687. /*<       call plot(icalc,locx,locy,locv) >*/
  688.     plot_(&status_1.icalc, &locx, &locy, &locv);
  689. /*<       call clrmem(locx) >*/
  690.     clrmem_(&locx);
  691. /*<       call clrmem(locy) >*/
  692.     clrmem_(&locy);
  693. /*<   750 loc=nodplc(loc) >*/
  694. L750:
  695.     loc = nodplc[loc - 1];
  696. /*<       go to 610 >*/
  697.     goto L610;
  698. /*<   760 continue >*/
  699. L760:
  700.     ;}
  701.  
  702. /*  finished */
  703.  
  704. /*<  1000 call clrmem(loutpt) >*/
  705. L1000:
  706.     clrmem_(&tabinf_1.loutpt);
  707. /*<       call second(t2) >*/
  708.     second_(&t2);
  709. /*<       rstats(11)=rstats(11)+t2-t1 >*/
  710.     miscel_1.rstats[10] = miscel_1.rstats[10] + t2 - t1;
  711. /*<       return >*/
  712.     return 0;
  713. /*<       end >*/
  714. } /* ovtpvt_ */
  715.  
  716. #undef cvalue
  717. #undef nodplc
  718. #undef rprn
  719. #undef aper
  720. #undef prform
  721. #undef subtit
  722.  
  723.  
  724.